package com.fqyd.campustransaction.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.fqyd.campustransaction.mapper.AppraiseMapper;
import com.fqyd.campustransaction.model.Appraise;
import com.fqyd.campustransaction.model.AppraiseExample;
import com.fqyd.campustransaction.service.AppraiseService;

/**
 * 
 * 
 * @author lixiaochong
 *
 * @create 2019年4月22日
 * 
 */
@Service
public class AppraiseServiceImpl implements AppraiseService {

	@Resource
	private AppraiseMapper mapper;
	
	/* (non-Javadoc)
	 * @see com.fqyd.campustransaction.service.BaseService#getAll()
	 */
	@Override
	public List<Appraise> getAll() {
		return mapper.selectByExample(new AppraiseExample());
	}

	/* (non-Javadoc)
	 * @see com.fqyd.campustransaction.service.BaseService#add(java.lang.Object)
	 */
	@Override
	public void add(Appraise t) {
		mapper.insert(t);
	}

	/* (non-Javadoc)
	 * @see com.fqyd.campustransaction.service.BaseService#update(java.lang.Object)
	 */
	@Override
	public void update(Appraise t) {
		mapper.updateByPrimaryKey(t);

	}

	/* (non-Javadoc)
	 * @see com.fqyd.campustransaction.service.BaseService#delete(java.lang.String)
	 */
	@Override
	public void delete(String id) {
		mapper.deleteByPrimaryKey(id);

	}

	/* (non-Javadoc)
	 * @see com.fqyd.campustransaction.service.BaseService#getById(java.lang.String)
	 */
	@Override
	public Appraise getById(String id) {
		return mapper.selectByPrimaryKey(id);
	}

}
